package com.android.model;

import org.json.JSONException;
import org.json.JSONObject;

public class Messageg {

	// dd
	private String title;
	private String time;
	private String from;
	private String url;

	public Messageg(String Title, String Time, String from, String url) {
		this.title = Title;
		this.time = Time;
		this.from = from;
		this.url = url;
	}

	public Messageg(String data) {
		try {
			JSONObject json = new JSONObject(data);

			title = json.getString("mess");
			time = json.getString("data");
			url = json.getString("url");
			from = json.getString("laiyuan");

		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public Messageg() {
		// TODO Auto-generated constructor stub
	}

	public String GetTitle() {
		return this.title;
	}

	public void SetTitle(String title) {
		this.title = title;
	}

	public String GetTime() {
		return this.time;
	}

	public void SetTime(String time) {
		this.time = time;
	}

	public String GetUrl() {
		return this.url;
	}

	public void SetUrl(String url) {
		this.url = url;
	}

	public void SetFrom(String from) {
		this.from = from;
	}

	public String GetFrom() {
		return this.from;
	}
}
